﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FormField.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.FormInfo.FormField" %>


<%@ Register src="~/SystemManage/Control/JGridControl.ascx" tagname="JGridControl" tagprefix="uc2" %>
<%@ Register src="/SystemManage/Control/SinglePictureControl.ascx" tagname="SinglePictureControl" tagprefix="uc1" %>

<form id="pageForm" method="post" runat="Server" class="pageForm required-validate"
    onsubmit="return validateCallback(this, navTabAjaxDone);" action="/SystemManage/Basics/FormInfo/FormField.aspx">

<div class="pageContent">
   	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add"  href="javascript:void(0);" onclick="addFormField($('.pageFormContent', navTab.getCurrentPanel()))"><span>添加项目</span></a></li>
          	</ul>
	</div>
    <div class="pageFormContent" layoutH="82">
        <%--<div class="formfield">
		<h3 class="contentTitle">项目设置</h3>  
        <dl class="nowrap">
            <dt>标题：</dt>
            <dd>
                <input type="text" />
                </dd>  
            
        </dl>
        <dl class="nowrap type">
            <dt>类型：</dt>
            <dd>
            <select class="type">
                <option value="text">文本输入</option>
                <option value="rbox">单选框</option>
                <option value="cbox">多选框</option>
                <option value="ddlist">下拉框</option>
            </select>
            </dd>  
        </dl>
        <dl class="nowrap data">
            <dt>&nbsp;</dt>
            <dd>
            <ul class="data">

            </ul>
            </dd>  
        </dl>
        <dl class="nowrap"><dt>必填：</dt>
            <dd>
            <input type="checkbox" />
                </dd>  
        </dl>
        <dl class="nowrap">
            <dt>验证：</dt><dd>
            <select class="type">
                <option value="-1">无</option>
                <option value="digits">数字</option>
                <option value="letters">字母</option>
                <option value="chinese">中文汉字</option>
                <option value="mobile">手机号码</option>
                <option value="tel">电话</option>
                <option value="email">邮箱</option>
                <option value="qq">QQ</option>
                <option value="date">日期</option>
                <option value="postcode">邮政编码</option>
            </select>
                </dd>  
        </dl>
        <dl class="nowrap">
            <dt>排序：</dt>
            <dd>
                <input type="text" />
                </dd>  
        </dl>
        <dl class="nowrap">
            <dt>说明：</dt>
            <dd><textarea cols="75" rows="2"></textarea>
                </dd>  
        </dl>
        <a class="button remove" style="float:right"><span>删除</span></a>
        <div class="divider"></div>
        </div>
--%>
	</div>
        
    <div class="formBar">
    <input id="json_data" name="json_data" type="hidden" />
	    <ul>
			<li>
	        <div class="buttonActive"><div class="buttonContent"><button onclick="submitJsonData()" type="submit">保存</button></div></div>
            </li>

			<li>
		    <div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div>
			</li>
		</ul>
    </div>
</div>

<script type="text/javascript">
    function submitJsonData() {
        var fields = getFormFieldList($('.pageFormContent', navTab.getCurrentPanel()));
        $('#json_data', navTab.getCurrentPanel()).val($.toJSON(fields));
    }

    $(document).ready(function () {
    setTimeout(function () {
        $(<%=JsonData %>).each(function(){
            addFormField($('.pageFormContent', navTab.getCurrentPanel()), this);
        });
    }, 500)
    });
</script>
</form>
